package render;

import org.zkoss.zul.Label;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.ListitemRenderer;

import entities.ArsFAMILIA;

public class FamiliasRenderer implements ListitemRenderer {

    public void render (Listitem listitem, Object value, int index) {
        ArsFAMILIA familia = (ArsFAMILIA)value;
        listitem.setValue(value);
        
        addListcell(listitem, familia.getCodigo());
        addListcell(listitem, familia.getDescripcion());

    }
    private void addListcell (Listitem listitem, String value) {
        Listcell lc = new Listcell ();
        Label lb = new Label(value);
        lb.setParent(lc);
        lc.setParent(listitem);
    }

}
